package com.zgjkhis.modules.system.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author yzq
 * @Description 门店表
 * @Date 2021/6/23 9:38
 * @Param
 * @return
 **/
@Data
@TableName("his_store")
public class Store implements Serializable {

    @TableId
    private Long id;

    @ApiModelProperty(value = "门店名称")
   private String storeName;
    @ApiModelProperty(value = "门店状态0：生效，1：失效")
   private Integer status;

    /** 创建时间 */
    @TableField(fill= FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "手机号")
    private String phone;
    @ApiModelProperty(value = "省")
    private String province;
    @ApiModelProperty(value = "市")
    private String city;
    @ApiModelProperty(value = "区")
    private String area;
    @ApiModelProperty(value = "详情地址")
    private String address;
    @ApiModelProperty(value = "创建者id")
    private String createUser;
    @ApiModelProperty(value = "省行政编码")
    private String provinceCode;
    @ApiModelProperty(value = "市行政编码")
    private String cityCode;
    @ApiModelProperty(value = "区行政编码")
    private String areaCode;
    @ApiModelProperty(value = "门店二维码")
    private String storeEwm;
    @ApiModelProperty(value = "物流接口appid")
    private String appId;
    @ApiModelProperty(value = "物流接口密钥")
    private String appIdSecret;
    private String channelId;

    public void copy(Store source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
